home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ Aug 89 / X0080-MacApp 2.0ß9 Idle p-Aug89 < prev    next >
Encoding:
Text File  |  1989-08-22  |  2.1 KB  |  59 lines  |  [TEXT/GEOL]

  1. Item    9843387                         18-Aug-89        15:21
  2.  
  3. From:   D0568                           Poseidon Systems, N Menendez,PRT
  4.  
  5. To:     MACAPP.TECH$                    MACAPP Tech
  6.  
  7. cc:     D0568                           Poseidon Systems, N Menendez,PRT
  8.  
  9. Sub:    MacApp 2.0ß9 Idle problems
  10.  
  11.  
  12. We are writing an application that creates multiple event cohandlers that work
  13. in the idle (continue) of the application.  In the idle of each of the
  14. cohandlers, we receive/send data to windows approximately every second.
  15.  
  16. The problem is the following: when we compile the program with -Debug on (using
  17. MacApp 2.0ß9), everything works well; however, if we compile with -noDebug, the
  18. application seems to startup fine, but starts to put up the watch cursor for
  19. longer and longer periods of time (if we break into Macsbug, the heap is
  20. corrupt), and the data being sent to the windows seems to take forever.
  21.  
  22. If in the idle of the event cohandler we add gApplication.Beep(1);, everything
  23. works fine after compiled with -noDebug (see code fragment) !!! (with the added
  24. inconvenience of a beep every second or so)
  25.  
  26. We thought it was a segmentation problem, and have been trying to resegment the
  27. application, but the problem persists.
  28.  
  29. *************************** Code Fragment ***************************
  30. FUNCTION TInstmtHandler.DoIdle(phase: IdlePhase): BOOLEAN;
  31.    BEGIN
  32.    IF (phase = idleContinue) THEN
  33.       BEGIN
  34.          { ***********
  35.          If we add gApplication.Beep(5); here, code works well under -NoDebug
  36.          }
  37.             IF DataReceived THEN   {Routine that indicates data has been receiv
  38.          BEGIN
  39.          {
  40.          Update Windows…
  41.          }
  42.          END                                   {IF DataReceived}
  43.       ELSE
  44.          BEGIN
  45.          {
  46.          Other idle time tasks…
  47.          }
  48.          END;
  49.       END;                                     {IF - phase = idleContinue}
  50.  
  51.    DoIdle := FALSE;
  52.    END;                                        {TInstmtHandler.DoIdle}
  53. *****************************************************************
  54.  
  55. Thank you so much for your assistance,
  56.  
  57. D0568
  58.  
  59.